package com.lzh.db.config;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.lzh.db.util.TimeUniqueIdUtil;

/**
 * @author zhehen.lu
 * @date 2025/8/15 11:00
 */
public class MillisecondIdGenerator implements IdentifierGenerator {
    public MillisecondIdGenerator() {
        // TODO document why this constructor is empty
    }

    @Override
    public Number nextId(Object entity) {
        return Long.parseLong(TimeUniqueIdUtil.milliSecond.currentTimestampLong() + "999");
    }
}